import javax.swing.*;
import java.awt.event.*;
import java.awt.*;

public class TheGui implements ActionListener
{
	JButton button;
	JFrame frame;
	
	public static void main(String[] args)
	{
		TheGui obj = new TheGui();
		obj.los();
	}
	public void los()
	{
		String string = "MEIN BUTTON";
		frame = new JFrame();
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		button = new JButton(string);
		button.addActionListener(this);
		
		frame.add(button);
		frame.setSize(300,300);
		frame.setVisible(true);
	}
	
	public void actionPerformed(ActionEvent ae)
	{
		button.setText("pressed");
	}
}